package com.mocai.merchant.exception;

/**
 * 可编码的异常类型
 */
public class CodeableRuntimeException extends RuntimeException {
    private String code;        //异常代码
    private String description; //异常描述

    public CodeableRuntimeException(String code) {
        this.code = code;
    }

    public CodeableRuntimeException(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public CodeableRuntimeException(Throwable cause, String code) {
        super(cause);
        this.code = code;
    }

    public CodeableRuntimeException(Throwable cause, String code, String description) {
        super(cause);
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}
